home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 331 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Array Parameters
  5. Date: Thu, 04 Jan 96 12:29:53 GMT
  6. Organization: none
  7. Message-ID: <820758593snz@genesis.demon.co.uk>
  8. References: <wayne.820650643@hawk> <4ce349$4j9@hacgate2.hac.com> <820701694snz@genesis.demon.co.uk> <4cg104$qmp@nervous.pdb.sni.de>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4cg104$qmp@nervous.pdb.sni.de>
  15.            mollers.pad@sni.de "Josef Moellers" writes:
  16.  
  17. >In <820701694snz@genesis.demon.co.uk> Lawrence Kirby <fred@genesis.demon.co.uk>
  18. > writes:
  19. >
  20. >[ ... ]
  21. >
  22. >>                                                       It is impossible
  23. >>to specify an array as a function parameter since, as in the example above,
  24. >
  25. >Well, if you MUST pass an array by value and not by reference, wrap it
  26. >into a structure:
  27.  
  28. Just to be clear that in this case the variable being passed is a
  29. structure, not an array. Of course the structure can contain any valid type
  30. of member. Also note that passing a pointer to someting is not the same
  31. as passing something by reference (as you can do, for instance, with the &
  32. reference declarator in C++).
  33.  
  34. -- 
  35. -----------------------------------------
  36. Lawrence Kirby | fred@genesis.demon.co.uk
  37. Wilts, England | 70734.126@compuserve.com
  38. -----------------------------------------
  39.